package com.agp.web;

import com.agp.entity.User;
import com.agp.service.UserService;
import com.agp.vo.ResponseEntity;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {

@Autowired
    private UserService userService;
    /**
     * 用户列表页
     *
     * @param
     * @return
     */
    @GetMapping("/list")
    @ApiOperation(value = "用户表列表页", httpMethod = "GET", response = ResponseEntity.class)
    public ResponseEntity<List<User>> page() {
        ResponseEntity res = new ResponseEntity();
        res.setData(userService.list());

        return res;
    }
}
